<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>2、比较两个数或对象的 key value 是否一致。 </title>
</head>

<body>
  <script>
    let arr = +prompt('输入数字')
    let num = +prompt('输入数字')
    if (arr === num) {
      alert('一致')
    }
    else {
      alert('不一致')
    }
  </script>
</body>

</html>